import request from '@/utils/request'

// 登录方法
export function login(data) {
	return request({
		'url': '/data/api.Login/in',
		headers: {
			isToken: false
		},
		'method': 'post',
		'data': data
	})
}

// 获取用户详细信息
export function getInfo() {
	return request({
		'url': '/data/api.auth.User/info',
		'method': 'post'
	})
}

// 退出方法
export function logout() {
	return request({
		'url': '/auth/logout',
		'method': 'delete'
	})
}

// 获取验证码
export function getCodeImg() {
	return request({
		'url': '/code',
		headers: {
			isToken: false
		},
		method: 'get',
		timeout: 20000
	})
}

// 获openid
export function getUserInfo(code) {
	return request({
		'url': '/third/wx/getOpenId/' + code,
		headers: {
			isToken: false
		},
		method: 'get',
		timeout: 20000
	})
}

// 获openid
export function getSystem(code) {
	return request({
		'url': '/system/homepage/get/customer/xcx_customer_service_phone',
		headers: {
			isToken: false
		},
		method: 'get',
		timeout: 20000
	})
}